const express = require("express");
const app = express();
app.listen(5555);

//一定要先引入模块
const proxy = require("http-proxy-middleware").createProxyMiddleware;
const cors = require("cors");
app.use(cors());

app.use(
  "/",
  proxy(["/"], {
    target: "http://localhost:65047",
    changeOrigin: true,
    pathRewrite: {
      "^/": "/",
    },
  })
);
app.use(express.static("public"));
